package es.castorm.business.customer;

import org.apache.bval.constraints.Email;
import org.apache.bval.constraints.NotEmpty;

import es.castorm.arch.service.AbstractDTO;

public class CustomerDTO extends AbstractDTO {

	@NotEmpty
	String firstname;

	@NotEmpty
	String lastname;

	@NotEmpty
	@Email
	String email;

	public String getFirstname() {
		return firstname;
	}

	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}

	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return String.format("CustomerDTO [id=%d, version=%d, firstname=%s, lastname=%s, email=%s]", getId(), getVersion(), firstname, lastname,
				email);
	}
}
